<template>
  <div class="card">
    <div class="title">
      <img :src="config.src" alt="">
      <div class="name">{{ config.name }}</div>
    </div>
    <main class="content">
      <div class="item" v-for="(item,index) in config.list" :key="index">
        <div class="item-name">{{ item.name }}</div>
        <div class="item-value">{{ item.value }}</div>
      </div>
    </main>
    <div class="operation">
      <div class="telephone">{{ config.val1 }}</div>
      <div class="helper">{{ config.val2 }}</div>
      <div slot="addBtn"></div>
    </div>
  </div>
</template>
<script>
export default{
  props:{
    config:{
      type:Object,
      // requist:true,
      default:() => {
        return {
          src:require('../../assets/999.jpeg'),
          name:'邵阳风',
          list:[
            { name:'身份证号',value:'591451*******215' },
            { name:'联系电话',value:'152 8535 4421' },
            { name:'家庭地址',value:'西湖区三墩镇灯彩街288号' },
            { name:'结对包联干部',value:'2人' },
          ]
        }
      }
    }
  },
  data(){
    return{

    }
  }
}
</script>
<style lang="scss" scoped>
.card{
  padding: 0.16rem 0.12rem;
  box-sizing: border-box;
  background-color: #fff;
  .title{
    display: flex;
    align-items: center;
    margin-bottom: 0.16rem;
    img{
      width: 0.25rem;
      height: 0.25rem;
      margin-right: 0.16rem;
    }
    .name{
      font-size: 0.18rem;
      font-family: PingFang SC-中黑体, PingFang SC;
      font-weight: bold;
      color: #363A44;
      line-height: 0.25rem;
    }
  }
  .content{
    padding: 0.16rem 0rem 0 0rem;
    box-sizing: border-box;
    border-top: 0.01rem solid #F6F6F6;
    .item{
      display: flex;
      justify-content: space-between;
      margin-bottom: 0.16rem;
      .item-name{
        font-size: 0.15rem;
        font-family: PingFang SC-常规体, PingFang SC;
        font-weight: normal;
        color: #686B73;
        line-height: 0.17rem;
      }
      .item-value{
        font-size: 0.15rem;
        font-family: PingFang SC-常规体, PingFang SC;
        font-weight: normal;
        color: #363A44;
        line-height: 0.17rem;
      }
    }
  }
  .operation{
    display: flex;
    justify-content: end;
    .telephone{
      width: 0.88rem;
      height: 0.28rem;
      border-radius: 0.59rem 0.59rem 0.59rem 0.59rem;
      border: 0.01rem solid #4B9FF8;
      font-size: 0.14rem;
      font-family: PingFang SC-常规体, PingFang SC;
      font-weight: normal;
      color: #4B9FF8;
      line-height: 0.28rem;
      text-align: center;
      margin-right: 0.12rem;
    }
    .helper{
      width: 0.88rem;
      height: 0.28rem;
      background: linear-gradient(45deg, #4B9FF8 0%, #69D4FA 100%);
      border-radius: 0.59rem 0.59rem 0.59rem 0.59rem;
      font-size: 0.14rem;
      font-family: PingFang SC-常规体, PingFang SC;
      font-weight: normal;
      color: #FFFFFF;
      line-height: 0.28rem;
      text-align: center;
      box-sizing: border-box;
    }
  }
}
</style>
